# Maintainer: Laurent Carlier <lordheavy@archlinux.org>
# Contributor: Shinlun Hsieh <yngwiexx@yahoo.com.tw>

pkgname=hatari
pkgver=2.4.1
pkgrel=2
pkgdesc='An Atari ST and STE emulator'
arch=('loong64' 'x86_64')
url='http://hatari.sourceforge.net/'
license=('GPL')
depends=(
  'glibc'
  'hicolor-icon-theme'
  'sdl2'
  'libpng'
  'libx11'
  'portmidi'
  'readline'
  'systemd-libs'
  'zlib'
)
makedepends=('cmake' 'systemd')
optdepends=(
  'python: for atari-convert-dir'
  'sh: for atari-hd-image, zip2st, hatari-prg-args'
)
source=("https://download.tuxfamily.org/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.bz2")
sha256sums=('2a5da1932804167141de4bee6c1c5d8d53030260fe7fe7e31e5e71a4c00e0547')

build() {
  cd ${pkgname}-${pkgver}

  ./configure --prefix=/usr

  make
}

package() {
  cd ${pkgname}-${pkgver}

  make DESTDIR="${pkgdir}" install
}
